<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of shop
 *
 * @author QUYET
 */
class Shop extends Userpage_Controller {

    //put your code here
    function __construct() {
        parent::__construct();
    }

    function view($user_name) {       
        $profile = $this->users_m->get(array('username' => $user_name));
        if (count($profile)==0) show_404();
        
        if ($profile->estore_id==0) show_404();
        
        $this->load->library('template',array(
                'theme_up_id' => $profile->theme_up
        ));
//                $this->template->user = (array) $this->user;;       
        
        //$sidebar = 'right_index';
//        if ($profile->user_id==$this->user->id) 
//            $sidebar = 'user_sidebar';
        $this->template
                ->set_hook('HMENU', 'hmenu')
                ->set_hook('RIGHT', 'right_index')
                ->title('ESTORE')
                ->build('index', array('profile' => $profile));        
    }

}

?>
